#ifndef GY_GRAPHICSBUTTONEDITITEM_H
#define GY_GRAPHICSBUTTONEDITITEM_H

#include "GY_GraphicsRectItem.h"
#include "GY_ControlLibrary_global.h"
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsRectItem>
/**
 * @brief The GY_GraphicsButtonEditItem class  图元可编辑点
 */
class GY_CONTROLLIBRARY_EXPORT GY_GraphicsButtonEditItem : public QObject, public QGraphicsPathItem
{
    Q_OBJECT
public:
    explicit GY_GraphicsButtonEditItem(QGraphicsItem *parent = nullptr);

signals:
    /**
     * @brief doubleClicked 鼠标双击信号
     */
    void doubleClicked();

    // QGraphicsItem interface

protected:
    /**
     * @brief mouseDoubleClickEvent 双击事件
     * @param event 鼠标事件
     */
    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
    /**
     * @brief paint 绘图
     * @param painter
     * @param option
     * @param widget
     */
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
};

#endif // GY_GRAPHICSBUTTONEDITITEM_H
